/*
 * @Author: 啊彪
 * @Date: 2021-08-25 20:18:52
 * @LastEditors: 啊彪
 * @LastEditTime: 2021-08-25 20:18:53
 * @Description: 物品日期
 * @FilePath: \fkxzg\src\model\log\itemlgos.model.ts
 */
import mongoose from 'mongoose';

const Schema = mongoose.Schema;
const ItemLogsSchema: mongoose.Schema = new Schema({
    roleId: { type: Number, display: '角色ID', index: true },
    nickName: { type: String, display: '角色昵称', index: true },
    serverId: { type: Number, display: '区服ID' },
    type: { type: String, display: '类型', index: true },
    itemName: { type: String, display: '物品名称', index: true },
    number: { type: String, display: '数量' },
    desc: { type: String, display: '描述' },
    func: { type: String, display: '功能', index: true },
    beforeNumber: { type: String, display: '修改前数量' },
    afterNumber: { type: String, display: '修改后数量' },
    createTime: { type: String, display: '创建时间' },
}).index({ roleId: 1, type: 1, itemName: 1 }).index({ roleId: 1, desc: 1 }).index({ roleId: 1, itemName: 1 }).index({ roleId: 1, desc: 1, type: 1 }).index({ roleId: 1, func: 1 }).index({ roleId: 1, type: 1, func: 1 });

const ItemLogs = mongoose.model('ItemLogs', ItemLogsSchema);
export default ItemLogs;
